package com.heima.admin.controller.v1;


import com.heima.apis.wemedia.ISwemediaSensitiveClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/news")
public class WemeDiaController {

    @Autowired
    private ISwemediaSensitiveClient iSwemediaSensitiveClient;

    //查询文章列表
    @PostMapping("/list_vo")
    public ResponseResult listVo(@RequestBody NewsAuthDto dto) {
        return iSwemediaSensitiveClient.listVo(dto);
    }

    //查询文章详情
    @GetMapping("/one_vo/{id}")
    public ResponseResult oneVo(@PathVariable("id") Integer id) {
        return iSwemediaSensitiveClient.oneVo(id);
    }

    //审核文章之审核失败
    @PostMapping("/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto) {
        return iSwemediaSensitiveClient.authFail(dto);
    }

    //审核文章之审核成功
    @PostMapping("/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto) {

        return iSwemediaSensitiveClient.authPass(dto);
    }
}
